<?php

namespace App\Http\Consts;

class LangConsts
{
    const EN = 1;

    const ZH = 2;

    public static function getLangCodeByStr($langStr){
        return match ($langStr) {
            'en' => self::EN,
            'zh' => self::ZH,
            default => self::EN,
        };
    }

    public static function getLangStrByCode($langCode){
        return match ($langCode) {
            self::EN => 'en',
            self::ZH => 'zh'
        };
    }
}
